package com.bestcem.xm.qdes.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bestcem.xm.component.mybatis.base.BaseEntity2;
import com.bestcem.xm.qdes.config.StringValue2FastJsonSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "ds_qdes_question")
public class QdesQuestion extends BaseEntity2 {

    @TableId(value = "id")
    private String id;

    /**
     * 问卷结构ID
     */
    @TableField(value = "struct_id")
    @JSONField(name = "structID")
    private String structId;

    /**
     * 问题全局ID
     */
    @TableField(value = "gid")
    private Integer gid;

    /**
     * 第三方的问题ID
     */
    @TableField(value = "ext_id")
    @JSONField(name = "extID")
    private String extId;

    /**
     * 题目数据
     */
    @TableField(value = "data")
    @JSONField(name = "data", serializeUsing = StringValue2FastJsonSerializer.class)
    private String data;

    /**
     * 是否修改
     */
    @TableField(value = "modified")
    private Boolean modified;
}
